<%-- 
    Document   : operador
    Created on : 17-feb-2012, 4:07:16
    Author     : Daniel
--%>

<%@page import="java.sql.SQLException"%>
<%@page import="escom.ipn.modelo.dto.catalogoIncidenteClass"%>
<%@page import="java.util.List"%>
<%@page import="escom.ipn.modelo.delegate.catalogoIncidenteDelegate"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Operador 066</title>         
        <link rel="stylesheet" type="text/css" href="../css/demo.css" />
	<link rel="stylesheet" type="text/css" href="../css/operador.css" />
        <link rel="stylesheet" type="text/css" href="../css/botones.css" />
        <link rel="stylesheet" type="text/css" href="../css/tablas.css" />
        <link rel="stylesheet" type="text/css" href="../css/jquery.alerts.css" />
        <link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css"  />
        <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
        <script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
        <script type="text/javascript" src="../js/jquery-ui-1.8.17.custom.min.js"></script>
        <script type="text/javascript" src="../js/jquery.alerts.js"></script>
        <script type="text/javascript" src="../js/geoCoder.js"></script>
        <script type="text/javascript" src="../js/Ajax.js"></script>
        <script type="text/javascript" src="../js/Operador.js"></script>
        
        <style type="text/css" title="currentStyle">
                @import "../js/media/css/demo_table.css";
                @import "../js/media/css/jquery.dataTables_themeroller.css";
        </style>
        <script type="text/javascript" language="javascript" src="../js/media/js/jquery.dataTables.js"></script> 
        <script type="text/javascript" src="../js/colorbox/jquery.colorbox.js"></script>
        <script type="text/javascript" src="../js/validaCampos.js"></script>
        
    </head>
    
    
    <body onload="initialize()">
        <%
        HttpSession sess = request.getSession(true);
        if(sess.getAttribute("tipoUsuario").toString()!="Operador"){
            if(sess.getAttribute("tipoUsuario").toString()=="Operador"){
                response.sendRedirect("../Administrador/administrador.jsp");
            }
            else {
                response.sendRedirect("../login.jsp");
            }
        }
        %>
                        
          <div id="incidente" class="panel">
            <div class="contenidoSeccion">
                <h2>Levantar Incidente</h2> 
                
                <!-- INICIO LEVANTAMIENTO-->
                <div id="levantamiento">
                    <p><label> Tipo Incidente </label>
                    <select id="tipoIncidente">
                    <%        
                        catalogoIncidenteDelegate del = new catalogoIncidenteDelegate();
                        try{
                            List lista = del.mostrarCatalogoIncidentes();
                            for (int i = 0; i < lista.size(); i++) {
                                catalogoIncidenteClass listaAmigos = (catalogoIncidenteClass) lista.get(i);%>                                
                                <option value="<%=listaAmigos.getIncidente()%>"> 
                                    <%=listaAmigos.getIncidente()%> 
                                </option>
                          <%}
                        }catch(SQLException e){e.printStackTrace();}%>                
                    </select></p>

                    <p><label>Direccion: </label><input id="address" name="address" type="text" size="30" /></p>
                    
                    <p><input type="button" 
                              class="button medium black" 
                              value="Enviar" 
                              onclick="LevantarIncidente()"/></p>
                    
                    <div id="map_canvas" style="width:100%; height:450px"></div>
                </div>
                 <!-- FIN LEVANTAMIENTO-->   
                 
                 <!-- INICIO SECCION DE PREGUNTAS-->
                <div id="atencion" style="display: none">
                    <div id="respuesta"></div>
                    
                   
                    
                    <p id="pReportante"> 
                        <label>Reportante: </label>
                        <input id="reportante" name="reportante" type="text" size="30" />
                        <input type="button" 
                              class="button medium black"
                              onClick="Reportante()" 
                              value="Enviar"/>
                    </p>
                    
                    <p id="pLugarReportante">
                        <label>Direccion Reportante: </label>
                        <input id="lugarreportante" name="lugarreportante" type="text" size="30" />
                        <input type="button" 
                              class="button medium black"
                              onClick="LugarReportante()" 
                              value="Enviar"/>
                        
                    </p>
                    <br/>
                    
                    <p>
                        <input type="submit" 
                              class="button medium black"
                              onClick="window.location = 'Terminar.jsp';" 
                              value="Finalizar Incidente"/>
                    </p>
                    
                    <div id="repetidos" style="height: auto">
                        <p><input type="button" 
                              class="button medium black"
                              onClick="EventosRepetidos()" 
                              value="Repetidos"/></p>
                    </div>
                    
                    <div class="informacion"id="bitacora" ></div>
                    
                    
                    
                </div>
                 <!-- FIN SECCION DE PREGUNTAS-->
                
                
                <input id="latitude" name="latitude" type="hidden" value="0"/>
                <input id="longitude" name="longitude" type="hidden" value="0"/>
                <input id="sector" name="sector" type="hidden" value="<%=sess.getAttribute("nombresector") %>"/>
                
            </div>
	</div>

        
        <div id="encabezado">
            <img src="../img/ESCOMLogo.png" alt="imagen escom" width="114px" height="100px"/>
                    <img src="../img/IPNLogo.png" alt="imagen ipn" width="115px" height="100px"/>
            <img src="../img/logo.JPG" alt="imagen 066" width="235px"/>
                <ul id="navegacion">
                    <li>
                        <a id="vinculoHome" 
                               href="#home" 
                               onClick="Logout()" 
                               value="Cerrar Sesion">
                                    <%=sess.getAttribute("tipoUsuario")%>
                                    <%=sess.getAttribute("Nombre")%>
                       </a>
                    </li>
                    <li>
                        <a id="Incidente" href="#incidente">Levantar Incidente</a>
                    </li>
		</ul><!-- /navegacion -->
	</div>
    </body>
</html>
